/**
 * 
 */
package com.ac4j.match;

import com.ac4j.sample.Sample;

/**
 * @author Helanmouse
 * 
 */
public class Match implements Comparable<Match> {
	Sample s;
	Position matchposition;
	Float matchscore;

	/**
	 * @return the simage
	 */
	public Sample getSample() {
		return s;
	}

	/**
	 * @return the matchposition
	 */
	public Position getMatchPosition() {
		return matchposition;
	}

	/**
	 * @return the matchscore
	 */
	public Float getMatchScore() {
		return matchscore;
	}

	/**
	 * @param simage
	 * @param matchposition
	 * @param matchscore
	 */
	public Match(Sample s, Position matchposition, Float matchscore) {
		this.s = s;
		this.matchposition = matchposition;
		this.matchscore = matchscore;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "Match: " + s.getText() + "\n" + matchposition.toString()
				+ "\nMatch Score:" + matchscore.toString();
	}

	@Override
	public int compareTo(Match o) {
		// TODO Auto-generated method stub
		return this.matchposition.Y.compareTo(o.matchposition.Y);
	}

}
